package com.leyou.auth.client;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient("auth-service")
public interface AuthClient {


    /**
     * 根据服务的clientId以及secret进行服务校验，校验成功返回配置文件中的私密key
     * 私密key很重要，===》secretKey===>JwtParser(解析token)
     * @param clientId
     * @param secret
     * @return
     */
    @GetMapping("/client/key")
     String getSecretKey(
            @RequestParam("clientId") String clientId,
            @RequestParam("secret") String secret);
}
